package com.minimalist.common.entity.lindi.vo.tradeapplicationtemplatecontract;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author 11987
 */
@Schema(name = "林地指标交易平台_交易申请合同模板查询实体")
public class LindiTradeApplicationTemplateContractQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "contractTemplateId", description = "合同模板ID", type = "string")
    private Long contractTemplateId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "fileId", description = "交易申请合同模板文件ID", type = "string")
    private Long fileId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "tradeApplicationId", description = "交易申请ID", type = "string")
    private Long tradeApplicationId;

    public LindiTradeApplicationTemplateContractQueryVO(){
    }

    public LindiTradeApplicationTemplateContractQueryVO(Long contractTemplateId, Long fileId){
        this.contractTemplateId = contractTemplateId;
        this.fileId = fileId;
    }

    public LindiTradeApplicationTemplateContractQueryVO(Long contractTemplateId, Long fileId, Long tradeApplicationId){
        this.contractTemplateId = contractTemplateId;
        this.fileId = fileId;
        this.tradeApplicationId = tradeApplicationId;
    }

    public Long getContractTemplateId(){
        return contractTemplateId;
    }

    public void setContractTemplateId(Long contractTemplateId){
        this.contractTemplateId = contractTemplateId;
    }

    public Long getFileId(){
        return fileId;
    }

    public void setFileId(Long fileId){
        this.fileId = fileId;
    }

    public Long getTradeApplicationId(){
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId){
        this.tradeApplicationId = tradeApplicationId;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiTradeApplicationTemplateContractQueryVO that = (LindiTradeApplicationTemplateContractQueryVO) o;
        if (contractTemplateId != null ? !contractTemplateId.equals(that.contractTemplateId) : that.contractTemplateId != null)
            return false;
        if (fileId != null ? !fileId.equals(that.fileId) : that.fileId != null)
            return false;
        return tradeApplicationId != null ? tradeApplicationId.equals(that.tradeApplicationId) : that.tradeApplicationId == null;
    }

    @Override
    public int hashCode(){
        int result = super.hashCode();
        result = 31 * result + (contractTemplateId != null ? contractTemplateId.hashCode() : 0);
        result = 31 * result + (fileId != null ? fileId.hashCode() : 0);
        result = 31 * result + (tradeApplicationId != null ? tradeApplicationId.hashCode() : 0);
        return result;
    }
}
